package com.heying.xmlandjson.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

public class Book {

    private String isbn;
    private String title;
    private int price;
    private String author;
    private String publisher;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date pdate;

    @Override
    public String toString() {
        return "Book{" +
                "isbn='" + isbn + '\'' +
                ", title='" + title + '\'' +
                ", price=" + price +
                ", author='" + author + '\'' +
                ", publisher='" + publisher + '\'' +
                ", pdate='" + pdate + '\'' +
                '}';
    }

    public String getIsbn() {
        return isbn;
    }

    public void setIsbn(String isbn) {
        this.isbn = isbn;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getPublisher() {
        return publisher;
    }

    public void setPublisher(String publisher) {
        this.publisher = publisher;
    }

    public Date getPdate() {
        return pdate;
    }

    public void setPdate(Date pdate) {
        this.pdate = pdate;
    }

    public Book() {
    }

    public Book(String isbn, String title, int price, String author, String publisher, Date pdate) {
        this.isbn = isbn;
        this.title = title;
        this.price = price;
        this.author = author;
        this.publisher = publisher;
        this.pdate = pdate;
    }
}
